<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="/view/common/common.jsp"%>

	<script type="text/javascript">
		function searchData() {
			$('#tab').datagrid('load',serializeForm($('#mySearchForm')));
		}
		function formatType(val, row) {
			if (val == '-1') {
				return '卖出';
			}
			if (val == '1') {
				return '买入';
			}
		}
		
		
		function formatStatus(val, row) {
			if (val == '1') {
				return '上架';
			}
			if (val == '-1') {
				return '下架';
			}
			if (val == '-2') {
				return '撤单';
			}
		}

	</script>

</head>
<body>

<div class="easyui-panel" fit="true">
	<div id="jqueryToolbar" style="padding:auto;height:auto">
		<div style="margin-top:5px; padding-bottom:8px; border-bottom:1px solid #ccc;">
			<form id="mySearchForm" action="" method="Post">
				手机号:	<input type="text" id="phone" name="phone" class="easyui-textbox"  style="width: 140px; height: 25px;"/>
				<a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="searchData()">查询</a>
			</form>
		</div>
	</div>

	<div id="system_user_list_tb" style="height: auto; padding-left: auto;">
		<!-- <a href="#" class="easyui-linkbutton" onclick="add()" data-options="iconCls:'icon-add',plain:true">添加</a> -->
	</div>

	<table id="tab" class="easyui-datagrid" fit="true" style="height:360px;width:auto" url="${ctx}/bProduct/getBProductList.do"
		   rownumbers="true" pagination="true" pagePosition="top" singleSelect="true"  toolbar="#system_user_list_tb" >
		<thead>
			<tr>
				<th field="nick_name" width="130" align="center" >姓名</th>
				<th field="phone" width="130" align="center" >手机号</th>
				<th field="price" width="130" align="center" >价格</th>
				<th field="original_Ifib_num" width="130" align="center" >原始数量</th>
				<th field="type" width="130" align="center"  data-options="formatter:formatType" >类型</th>
				<th field="change_ifib_num" width="130" align="center" >剩余数量</th>
				<th field="status" width="130" align="center"  data-options="formatter:formatStatus" >委托状态</th>
				<th field="create_time"  width="180" align="center">创建时间</th>
			</tr>
		</thead>
	</table>


</div>


</body>
</html>
